package cmd

import "time"

type CmdGetindexsByTimes struct {
	StartTime time.Time `json:"startTime" time_format:"2006-01-02T15:04:05Z08:00"`
	EndTime   time.Time `json:"endTime" time_format:"2006-01-02T15:04:05Z08:00"`
}

func (c *CmdGetindexsByTimes) GetProportionByKeepRecords() float32 {
	duration := c.EndTime.Sub(c.StartTime)
	times := duration.Seconds() / 10
	if times < 50 {
		return 1
	} else {
		return float32(50 / times)
	}
}
